<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        body,html{
            width: 100%;
            height: 100%;
        }
        embed{
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <!-- <embed type="application/pdf" id="demo" src="zhong.pdf"  /> -->
    <script>
        let hash = location.hash.slice(1);
        let pdf = hash;
        function assertEmbed(src){
            const curEmbed = document.querySelector('embed');
            if(curEmbed)
                curEmbed.remove()
            const embed = document.createElement('embed');
            embed.type = "application/pdf";
            embed.src = src;
            document.body.appendChild(embed)
        }
        assertEmbed(pdf)
    </script>
</body>

</html>